﻿<local:DialogWindow x:Class="Common.Dialogs.ConfirmDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Common.Dialogs"
             mc:Ignorable="d" 
             WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize"
             Background="Transparent" WindowStartupLocation="CenterScreen"
             x:Name="confirmDialog"
             Height="248" Width="337">
    <local:DialogWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles/CommonStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </local:DialogWindow.Resources>
    <Grid x:Name="LayoutRoot" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border x:Name="HeaderBorder" Grid.Row="0" BorderThickness="2,2,2,0" CornerRadius="10,10,0,0" BorderBrush="Black" Background="SteelBlue"
                MouseDown="HeaderBorder_MouseDown"
                >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <StackPanel HorizontalAlignment="Left" Grid.Column="0">
                    <TextBlock Text="{Binding ElementName=confirmDialog, Path=HeaderText}" Style="{StaticResource DialogHeaderTextStyle}" FontSize="14" FontWeight="Bold" Margin="8"/>
                </StackPanel>
                <StackPanel HorizontalAlignment="Right" Grid.Column="1">
                    <Button VerticalAlignment="Center" Margin="8" Style="{StaticResource CloseButtonStyle}" IsCancel="True">
                        <Button.Content>
                            <Image Source="Images/305_Close_16x16_72.png" Width="12" Height="12"/>
                        </Button.Content>
                    </Button>
                </StackPanel>
            </Grid>
        </Border>
        <Border Grid.Row="1" BorderThickness="2,0,2,2" CornerRadius="0,0,4,4" BorderBrush="Black" Background="LightGray">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <Image Source="Images/109_AllAnnotations_Help_48x48_72.png" Width="48" Height="48" Grid.Row="0" Grid.Column="0" Margin="8"/>
                <TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource NotificationTextBoxStyle}" Margin="8" IsReadOnly="True"
                    VerticalContentAlignment="Center"
                    Text="{Binding ElementName=confirmDialog, Path=MessageText}" AcceptsReturn="True" TextWrapping="Wrap" />
                <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="8,8,0,8" HorizontalAlignment="Right" Orientation="Horizontal">
                    <Button x:Name="YesButton" Content="Yes" Width="75" IsDefault="True" Margin="6"
                            Style="{StaticResource DialogButtonStyle}"
                            Click="YesButton_Click"/>
                    <Button x:Name="NoButton" Content="No" Width="75" IsCancel="True" Margin="6"
                            Style="{StaticResource DialogButtonStyle}"
                            Click="NoButton_Click"/>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</local:DialogWindow>
